cd c:\data\2022ConsCourt\

set type double
use KimNolettePOPFigure1, clear

sort decade
save KimNolettePOPFigure1, replace

graph set window fontface "Times New Roman"
graph bar noneurope europe, over(decade) stack b1title(Decade, size(medsmall)) ///
blabel(total, position(outside)) ///
bar(1, fcolor(white) lcolor(black) lpattern(solid) lwidth(thin)) ///
bar(2, fcolor(gs10) lcolor(black) lpattern(solid) lwidth(thin)) ///
legend(cols(1) pos(10)) ///
ylabel (0(20)90) ytitle("Number of countries with a Kelsenian constitutional court") ///
yline(0(20)90, lcolor(gray) lwidth(thin)) ///
legend(region(lstyle(solid) lwidth(thin)) ///
ring(0) label(1 "Non-Europe") label(2 "Europe") order(2 1)) ///
scheme(s2mono) ///
graphregion(color(white)) ///
saving("KimNoletterPOPFigure1", replace)

**After drawing the graph, (1) "Start Graph Editor"; (2) manually delete odd-numbered barlabels [1] to [15]; (3) Save the changes; and (4) "Stop Graph Editor."

clear
exit

********************************************************************************

cd c:\data\2022ConsCourt\

set type double
use KimNolettePOPFigure2, clear

sort regionnum
save KimNolettePOPFigure2, replace

graph set window fontface "Times New Roman"
graph bar total, over(region, axis(lwidth(thin)) sort(regionnum)) ///
bar(1, fcolor(white) lcolor(black) lpattern(solid) lwidth(thin)) ///
legend(off) ///
ylabel(0(5)35, tlwidth(thin)) yscale(lwidth(thin)) ///
ytitle("Number of countries with a Kelsenian constitutional court") ///
yline(0(5)35, lcolor(gray) lwidth(thin)) ///
scheme(s2mono) ///
graphregion(color(white)) ///
saving("KimNoletterPOPFigure2", replace)

**After drawing the graph, (1) "Start Graph Editor"; (2) manually right-click bars[3]'s "Object-specific properties" and change the color from "White" to "Grayscale 10"; (3) Save the changes; and (4) "Stop Graph Editor."

clear
exit

********************************************************************************

cd c:\data\2022ConsCourt\

set type double
use KimNolettePOPFigure3, clear

sort num
save KimNolettePOPFigure3, replace

graph set window fontface "Times New Roman"
graph hbar percentage, over(variable, axis(off) sort(num)) ///
scheme(s2mono) /// 
graphregion(color(white)) legend(off) ///
yscale(range(-1850 4400)) ylabel(0, glcolor(gray) glwidth(thin)) ytitle("Percentage change in the predicted baseline hazard rate", size(medsmall)) ///
blabel(group, position(outside) size(small)) ///
bar(1, color(gs10) lcolor(black) lpattern(solid) lwidth(thin)) ///
saving("KimNoletterPOPFigure3", replace)

clear
exit
